package cn.cqsw.service;

import cn.cqsw.dao.EmployeeDao;
import cn.cqsw.pojo.Employee;

import java.util.List;

public class EmployeeService {
    //查询所有
    public List<Employee> findEmployees() {
        return new EmployeeDao().findEmployees();
    }

    public int insertEmployee(Employee employee) {
        return new EmployeeDao().insertEmployee(employee);
    }
    public int deleteUserById(int id){
        return new EmployeeDao().deleteUserById(id);
    }

    //通过id查询员工信息
    public Employee findEmployeeById(int id){
        return new EmployeeDao().findEmployeeById(id);
    }
    public int updateEmployee(Employee employee){
        return new EmployeeDao().updateEmployee(employee);
    }

    }